package com.superb.common.properties;

import feign.Logger;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author: ajie
 * @CreateTime: 2024-05-07 14:05
 */
@Data
@Component
@RefreshScope
@ConfigurationProperties(value = "superb.custom")
public class SuperbCustomProperties {

    /**
     * 租户忽略拦截
     */
    private Set<String> ignoreTenantTable = new HashSet<>();

    /**
     * 租户忽略
     */
    private String baseTenant = "superb";

    /**
     * 删除忽略拦截
     */
    private Set<String> ignoreDelTable = new HashSet<>();

    /**
     * 全局白名单，忽略租户与客户端
     */
    private Set<String> ignoreUrl = new HashSet<>();

    /**
     * 子服务忽略白名单，不忽略租户与客户端
     */
    private Set<String> ignoreServiceUrl = new HashSet<>();

    /**
     * 字段索引校验
     */
    private Set<String> indexCheckColumns = new HashSet<>();

    /**
     * 存入数据库加解密秘钥
     */
    private String fieldEncryKey = "Xv%jQDLd#yWem#Superb=Q*MJ*H%U8gc";

    /**
     * feign远程调用日志记录级别
     */
    private Logger.Level feignLevel;
}
